<!DOCTYPE html>
<html>
<head>
	<title>QQ卡片生成</title>
</head>
<body>
<p style="text-align: center;">qqxml强制抓取，使qq聊天中的链接自动转化为卡片式。<br />本页源码自行下载，或者前往<a href="https://github.com/Lruihao/Grocery/tree/master/javascript">Grocery</a></p>
<script type="text/javascript">
	//设置刷新前缀url=首页地址（最好使用https）
	var base_src = "https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshareget_urlinfo?url=https://lruihao.cn";
	//用户地址
	//var custom_src = "https://lruihao.cn";
	//初始化工作地址
	var new_src = "";
	function createArrayAndOpenWindow(){
		//alert("number function");
		//定义数组存储后缀
		var numberArray = new Array(4);
 		//存储后缀
 		numberArray[0] = "/about/";
 		numberArray[1] = "/categories/";
 		numberArray[2] = "/tags/";
 		numberArray[3] = "/archives/";
 		//numberArray[4] = "/guestbook/";
 
 		
 		//遍历
 		for(var i = 0; i <numberArray.length;i++){
 			new_src = base_src + numberArray[i];
 			//打开该地址
 			open_new();
 			//清空后缀
 			new_src = "";
 		}

	}
	
	//负责打开窗口,并关闭
	function open_new(){
		var new_window =  window.open(new_src,'','width=400,height=200');
		setTimeout(function(){
			//开启后200ms（单页）关闭，速度自行把握数组越大时间越多
			new_window.close();
		}, 2000);
	}

	window.onload =function(){
		 createArrayAndOpenWindow();
		 //设置定时函数，疯狂刷新直到xml出现内容
		 var timer =  setInterval("createArrayAndOpenWindow()", 2000);
		 
	}

</script>
</body>
</html>